package com.coco.dao;

import com.coco.model.VideoCondition;
import com.coco.model.VideoModel;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author GHOSTLaycoo
 * @date 2020/4/13 0013 - 上午 8:45
 */
public interface VideoMapper {
    List<VideoModel> getVideosByCondition(@Param("video") VideoCondition videoCondition);

    long getCountByCondition(@Param("video") VideoCondition videoCondition);

    int delete(String id);

    int save(VideoModel videoModel);

    int update(VideoModel videoModel);

    List<VideoModel> getAllVideo();

    VideoModel getVideoById(String id);

    int updateWatch(@Param("id") String id,@Param("sum") long sum);

    int updateStar(@Param("id")String id,@Param("star") int sum);
}
